home *** CD-ROM | disk | FTP | other *** search
- Path: chronicle.mti.sgi.com!news
- From: austern@isolde.mti.sgi.com (Matt Austern)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Subject: Re: C/C++ knocks the crap out of Ada
- Date: 26 Feb 1996 17:45:55 GMT
- Organization: SGI
- Message-ID: <AUSTERN.96Feb26094555@isolde.mti.sgi.com>
- References: <00001a73+00002504@msn.com> <4etcmm$lpd@nova.dimensional.com>
- <312515DF.7D3B@cmlj.demon.co.uk> <4gad29$ddp@druid.borland.com>
- <4ggshe$7bk@goanna.cs.rmit.EDU.AU> <4gmp2o$ian@ux1.lmu.edu>
- <312FDB27.4B83@inav.net>
- Reply-To: austern@mti.sgi.com
- NNTP-Posting-Host: isolde.mti.sgi.com
- In-reply-to: JR Crosmer's message of Sat, 24 Feb 1996 21:44:39 -0600
-
- In article <312FDB27.4B83@inav.net> JR Crosmer <rainbow@inav.net> writes:
-
- > > >(4) C++ in particular has been changing very rapidly. It seems as if every
- > > > time I turn around there is a new keyword.
- >
- > What is the status of the plain/ordinary/but very noticably forgotten boolean?
- >
- > It seems that the biggest difficutly that run into is that everybody needs/wants to
- > declare a new version (and they are not all compatible!). Because C/C++ were never
- > polite enough to provide it to begin with (0 or non-zero is hardly a good substitute)
- > we end up either creating the (ITEM, NON_ITEM) form, create yet another version
- > (my latest is BooleaN, { FalsE, TruE } ). I think I remember something about
- > BOOL in one of the C or C++ stds. Which compilers use it? (Borland does not,
- > at least thru 4.0).
-
- C does not have a boolean type, but C++ does. It was added precisely
- because every language was defining its own boolean type: it was clear
- that a standard boolean type was needed for the sake of avoiding name
- clashes.
-
- The C++ boolean type is called bool, and its two permissible values
- are the manifest constants true and false. For the sake of
- compatibility with old code, there are standard conversions from bool
- to int and from int to bool.
- --
- Matt Austern
- SGI: MTI Compilers Group
- austern@isolde.mti.sgi.com
-